﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Configuration;
using System.Configuration;

namespace AVCare.LMS.Util
{
    public class SystemConfigurationManager
    {
        public static string ConnectionString
        {
            get
            {
                try
                {
                    return WebConfigurationManager.ConnectionStrings["LMSEntities"].ConnectionString;
                }
                catch
                {
                    return "Data Source=localhost;Initial Catalog=LMS;Persist Security Info=True;User ID=sa;Password=admini";
                }
            }
        }

        public static string DataProvider
        {
            get
            {
                return WebConfigurationManager.AppSettings["dataProvider"];
            }
        }

        public static string FileRoot
        {
            get
            {
                return WebConfigurationManager.AppSettings["fileServer"];
            }
        }
        public static bool BackupUserFile
        {
            get
            {
                return bool.Parse(WebConfigurationManager.AppSettings["backupUserFile"]);
            }
        }
    }
}
